home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / VIEW.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  933b  |  27 lines

  1. ' VIEW.BAS
  2. ' This program demonstrates the VIEW PRINT statement.
  3.  
  4. CLS
  5.  
  6. PRINT "Welcome to the VIEW program!!"  ' print intro message
  7. PRINT
  8. PRINT "Let's watch some things scroll by..."
  9. PRINT STRING$(80, "-");                ' print top line
  10.  
  11. LOCATE 24, 1: PRINT STRING$(80, "-");  ' print bottom line
  12. LOCATE 25, 1: INPUT ; "Press Enter to start the program... ", dummy$
  13.  
  14. VIEW PRINT 5 TO 23                     ' enable viewport (lines 5-23)
  15.  
  16. COLOR 2                                ' set color to green
  17. FOR i% = 1 TO 200
  18.     PRINT "This is line"; i%           ' print message 200 times
  19. NEXT i%
  20. COLOR 7                                ' set color to default white
  21.  
  22. VIEW PRINT                             ' disable viewport
  23. LOCATE 25, 1: INPUT ; "Press Enter to clear the viewport... ", dummy$
  24. VIEW PRINT 5 TO 23                     ' enable viewport
  25. CLS 2                                  ' clear viewport only
  26.  
  27.